package com.ruoyi.supermarket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supermarket.mapper.FacilityMapper;
import com.ruoyi.supermarket.domain.Facility;
import com.ruoyi.supermarket.service.IFacilityService;

/**
 * 设施信息Service业务层处理
 * 
 * @author lxl
 * @date 2024-07-21
 */
@Service
public class FacilityServiceImpl implements IFacilityService 
{
    @Autowired
    private FacilityMapper facilityMapper;

    /**
     * 查询设施信息
     * 
     * @param fid 设施信息主键
     * @return 设施信息
     */
    @Override
    public Facility selectFacilityByFid(Long fid)
    {
        return facilityMapper.selectFacilityByFid(fid);
    }

    /**
     * 查询设施信息列表
     * 
     * @param facility 设施信息
     * @return 设施信息
     */
    @Override
    public List<Facility> selectFacilityList(Facility facility)
    {
        return facilityMapper.selectFacilityList(facility);
    }

    /**
     * 新增设施信息
     * 
     * @param facility 设施信息
     * @return 结果
     */
    @Override
    public int insertFacility(Facility facility)
    {
        return facilityMapper.insertFacility(facility);
    }

    /**
     * 修改设施信息
     * 
     * @param facility 设施信息
     * @return 结果
     */
    @Override
    public int updateFacility(Facility facility)
    {
        return facilityMapper.updateFacility(facility);
    }

    /**
     * 批量删除设施信息
     * 
     * @param fids 需要删除的设施信息主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFids(Long[] fids)
    {
        return facilityMapper.deleteFacilityByFids(fids);
    }

    /**
     * 删除设施信息信息
     * 
     * @param fid 设施信息主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFid(Long fid)
    {
        return facilityMapper.deleteFacilityByFid(fid);
    }
}
